<?php	 	 
$this->breadcrumbs=array(
	'News'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List News','url'=>array('index')),
	array('label'=>'Create News','url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('news-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage News</h1>


<?php	 	  $this->widget('bootstrap.widgets.BootGridView',array(
	'id'=>'news-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		'id',
		'title',
		array(
			'name'=>'created_by',
			'value'=>'User::model()->findByPk($data->created_by)->profile->fullname',
		),
		array(
			'name'=>'kategori_id',
			'value'=>'NewsCategory::model()->findByPk($data->kategori_id)->category_name',
		),
		'create_date',
		
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
